#pragma once


#include <atlddx.h>
#include <atlcrack.h>

#include "resource.h"

class CRoomRenameDlg : public CDialogImpl<CRoomRenameDlg>,
	public CWinDataExchange<CRoomRenameDlg>
{
public:
	CRoomRenameDlg(void);
	~CRoomRenameDlg(void);

	enum { IDD = IDD_DLG_ROOM_RENAME };

	BEGIN_MSG_MAP(CRoomRenameDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		COMMAND_HANDLER_EX(IDC_BTN_CANCEL, BN_CLICKED, OnBtnCancelBnClicked)
		COMMAND_HANDLER_EX(IDC_BTN_OK, BN_CLICKED, OnBtnOkBnClicked)		
	END_MSG_MAP()

protected:

	wstring m_strRoomName;

public:

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	LRESULT OnBtnCancelBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	LRESULT OnBtnOkBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);

	int ResetDlgText(void);

	int SetRoomName(wstring strName);
	wstring GetRoomName(void);
};


